// Colors
@black: #000;
@black-muted: rgba(0, 0, 0, 0.45);
@black-muted-55: rgba(0, 0, 0, 0.55);
@black-muted-65: rgba(0, 0, 0, 0.65);
@white: #fff;
@divider: rgba(109, 65, 0, 0.15);
@container-bg: linear-gradient(117deg, #ffda8d 1.38%, #bf630f 94.19%);
@details-bg: #ffdab2;

// Fonts
@font-inter: 'Inter-Regular';
@font-din: 'Inter-Regular';
@font-din-bold: 'Inter-Regular';

.container {
  width: 328px;
  flex-shrink: 0;
  padding: 16px 8px 8px 8px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  background: @container-bg;
  overflow: hidden;
  transition: height 0.3s ease-in-out;

  &.collapsed {
    height: 110px;
  }

  &.expanded {
    height: 180px;
  }
}

.header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: @black-muted-55;
  margin-bottom: 4px;
  margin-left: 8px;
  font-family: @font-inter;
  font-size: 12px;
  font-weight: 600;
  line-height: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.balanceWrapper {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  margin-left: 8px;

  [style*='transform'] {
    transition: transform 0.3s ease-in-out;
  }
}

.balanceContent {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.balanceNumber {
  color: @black;
  font-family: @font-din-bold;
  font-size: 28px;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: 0.56px;
  white-space: nowrap;
}

.unit {
  .balanceNumber();
  margin-left: 8px;
  margin-right: 16px;
  white-space: nowrap;
  font-size: 28px;
}

.decimal {
  color: @black-muted;
  font-family: @font-din-bold;
  font-size: 28px;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: 0.56px;
  white-space: nowrap;
}

.fb_unit {
  .balanceNumber();
  margin-left: 8px;
  margin-right: 16px;
  white-space: nowrap;
  font-size: 18px;
}

.fb_decimal {
  color: @black-muted;
  font-family: @font-din-bold;
  font-size: 18px;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: 0.56px;
  white-space: nowrap;
}

.usdValue {
  color: @black-muted;
  margin-bottom: 0;
  margin-left: 8px;
  white-space: nowrap;
  min-height: 20px;
}

.detailsWrapper {
  width: 312px;
  height: 62px;
  flex-shrink: 0;
  border-radius: 16px;
  background: #ffdab2;
  overflow: hidden;
  opacity: 0;
  max-height: 0;

  transform: translateY(10px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, max-height 0.3s ease-in-out, margin 0.3s ease-in-out;

  .expanded & {
    opacity: 1;
    transform: translateY(0);
    max-height: 62px;
    margin-top: 12px;
  }
}

.detailsContainer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 12px 8px;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  position: relative;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 8px;
}

.column:first-child {
  margin-left: 0;
}

.label {
  color: @black-muted-65;
  font-family: @font-inter;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.detailsAmount {
  display: flex;
  align-items: center;
  gap: 2px;
  color: @black;
  font-family: @font-din;
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  width: 97px;
  min-height: 24px;
  white-space: nowrap;
}

.detailsDecimal {
  color: @black-muted;
  font-family: @font-din;
  font-size: 11px;
  font-weight: 700;
  line-height: 24px;
  white-space: nowrap;
}

.unlockButton {
  width: 68px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 25px;
  background: @black;
  color: @white;
  text-align: center;
  font-family: @font-inter;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  margin-left: auto;
  margin-right: 0;
  white-space: nowrap;

  &.disabled {
    background: @black-muted;
    cursor: not-allowed;
    span,
    img {
      opacity: 0.3;
    }
  }

  &:hover:not(.disabled) {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  &:active:not(.disabled) {
    transform: translateY(0);
    box-shadow: none;
  }

  span {
    margin-right: 4px;
    white-space: nowrap;
  }
}

.divider {
  width: 1px;
  height: 32px;
  background: @divider;
  margin: 0 9px;
  flex-shrink: 0;
}

.backgroundImage {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.decorativeLineOne {
  position: absolute;
  width: 51px;
  height: 235px;
  top: -30px;
  right: 64px;
  border-left-style: solid;
  border-left-width: 1px;
  border-left-color: rgba(255, 255, 255, 0.3);
  transform: rotate(-30deg);
  background: linear-gradient(91deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0.2;
  pointer-events: none;
  z-index: 1;
}

.decorativeLineTwo {
  position: absolute;
  width: 84px;
  height: 210px;
  top: -40px;
  right: -13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: rotate(-30deg);
  background: linear-gradient(89deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0.2;
  pointer-events: none;
  z-index: 1;
}

.decorativeImage {
  position: absolute;
  width: 64px;
  height: 64px;
  top: 0;
  right: 0;
  object-fit: cover;
  pointer-events: none;
}

.questionIconWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.tooltipStyle {
  max-width: 328px;
  border-radius: 8px;
  background: #1d1e23;
  width: 328px;
  height: 110px;
  padding: 16px;
  color: @white;
  font-size: 14px;
  line-height: 20px;
  font-family: @font-inter;
  white-space: nowrap;
}
